var useragent = navigator.userAgent;
if (useragent.match(/MicroMessenger/i) != 'MicroMessenger') {
    var opened = window.open('about:blank', '_self');
    opened.opener = null;
    opened.close()
}
function onBridgeReady() {
    WeixinJSBridge.call('hideOptionMenu')
}
if (typeof WeixinJSBridge == "undefined") {
    if (document.addEventListener) {
        document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false)
    } else if (document.attachEvent) {
        document.attachEvent('WeixinJSBridgeReady', onBridgeReady);
        document.attachEvent('onWeixinJSBridgeReady', onBridgeReady)
    }
} else {
    onBridgeReady()
}
$(function() {
    $("#g").live("click", 
    function() {
        window.location.href = "http://vote2014g.xayoudao.com"
    });
    $("#z").live("click", 
    function() {
        window.location.href = "http://vote2014z.xayoudao.com"
    })
});